public class MyDate {
    public int year;
    public int mouth;
    public int day;//成员变量的初始化加上public


    public void SetDate(int y, int m, int d) {
         this.year = y;//表示当前对象的值
         this.mouth = m;
         this.day = d;
    }
    public void PrintDate() {
        System.out.println(" year:" + year + " mouth:" + mouth + " day:" + day);
    }
    public MyDate() {
        System.out.println("不带参数的构造方法");
    }
    //构造方法帮我们对成员变量的初始化

}
